Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

126
Vistas
how can i get the "validade" value from the array and get only?

The array

    {"status":true,"data":[{"id":1,"pessoa_id":75505,"created_at":"2022-02- 
    01T17:42:46.000000Z","holder":"LEONARDO LIMA","validade":"2026-06- 
    01","bandeira":"Mastercard"}]}

Inside digiAno I wanted to put only the year value of the array

this.dadosCC.reset({
  'parcelas': '1',
  'digiNumero': ['**** **** ****', cartao.mask] ,
  'digiNome': cartao.holder,
  'digiMes': '',
  'digiAno': cartao.validade,
  'valor': this.cartS.cart.valorTotal,
  'cpfInput': this.userS.user.cpf,
  'cardToken': this.cardToken,
  'digiCVV':''
 });
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you want to get the entire information of validade and put that information inside cartao use this code:

myObject: any = {
    "status": true,
    "data": [{
      "id": 1,
      "pessoa_id": 75505,
      "created_at": "2022-02-01T17:42:46.000000Z",
      "holder": "LEONARDO LIMA",
      "validade": "2026-06-01",
      "bandeira": "Mastercard"
    }]
  };

  cartao: any = this.myObject.data[0].validade;

If you want to get year, month and the day use this.

myObject: any = {
    "status": true,
    "data": [{
      "id": 1,
      "pessoa_id": 75505,
      "created_at": "2022-02-01T17:42:46.000000Z",
      "holder": "LEONARDO LIMA",
      "validade": "2026-06-01",
      "bandeira": "Mastercard"
    }]
  };

  cartao: any = this.myObject.data[0].validade;

  dateArray: any = this.cartao.split('-');
  
  year = this.dateArray[0];
  month = this.dateArray[1];
  day = this.dateArray[2];
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda